<template>
  <div>
    <h1>Choose your course form!</h1>
    <div style="margin: 0 0 30px 50px;">
      <span>Current Unit: Tour:1 Unit:2</span>
      <el-button style="margin-left: 10px; height: 40px;"><router-link to="/progressMap">choose unit</router-link></el-button>
    </div>
    <ul id="course-list">
      <li><a @click="showUnscramble">UNSCRAMBLE</a></li>
      <li><a @click="showMatchupclick">MATCHUPCLICK</a></li>
      <li><a @click="to_LETTER_NUMBER_MATCH">LETTER_NUMBER_MATCH</a></li>
      <li><a @click="showMultiplechoice">MULTIPLECHOICE</a></li>
      <li @click="to_A_CLOZE_B_GIVEN"><a>A_CLOZE_B_GIVEN</a></li>
      <li @click="to_A_GIVEN_B_CLOZE"><a>A_GIVEN_B_CLOZE</a></li>
      <li @click="to_A_GIVEN_B_BLANK"><a>A_GIVEN_B_BLANK</a></li>
      <li><a @click="showGame">GAME</a></li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'Special',
  components: {},
  data() {
    return {

    }
  },
  methods: {
    async handleLogout() {
      await this.$store.dispatch('user/logout')
      // 退出后刷新页面
      this.$router.go(0)
    },

    async handleLogin() {
      // 跳转到登录页
      this.$router.push(`/login?redirect=${this.$route.fullPath}`)
    },

    to_A_CLOZE_B_GIVEN() {
      this.$router.push(`/A_CLOZE_B_GIVEN?redirect=${this.$route.fullPath}`)
    },
    to_A_GIVEN_B_CLOZE() {
      this.$router.push(`/A_GIVEN_B_CLOZE?redirect=${this.$route.fullPath}`)
    },
    to_A_GIVEN_B_BLANK() {
      this.$router.push(`/A_GIVEN_B_BLANK?redirect=${this.$route.fullPath}`)
    },

    to_LETTER_NUMBER_MATCH() {
      this.$router.push('/LETTER_NUMBER_MATCH')
    },

    async showUnscramble() {
      this.$router.push('/UNSCARAMBLE')
    },

    async showMatchupclick() {
      this.$router.push('/MATCHUPCLICK')
    },

    async showMultiplechoice() {
      this.$router.push('/MULTIPLECHOICE')
    },
    async showGame() {
      this.$router.push('/GAME')
    }
  }
}
</script>

<style scoped>
  * {
    margin: 0px;
    padding: 0px;
    color: white;
  }

  h1{
    margin: 50px;
    margin-bottom: 20px;
  }

  #course-list {
    overflow: hidden;
    list-style-type: none;
    font-size: 15px;
    line-height: 100px;
  }

  #course-list li {
    float: left;
    margin-left: 50px;
    margin-bottom: 50px;
  }

  #course-list li a {
    display: block;
    height: 100px;
    width: 230px;
    background-color: #323232;
    text-align: center;
    border-left: 3px solid white;
    border-right: 3px solid white;
  }

  .el-button {
    margin: 5px;
    width: 100px;
    height: 50px;
    font-size: 15px;
    background-color: #323232;
  }
</style>
